/***********************************************************************
 * Module:  ResultList.java
 * Author:  dengwei
 * Purpose: Defines the Class ResultList
 ***********************************************************************/

package com.caits.lbs.framework.bean.common;

import java.util.ArrayList;
import java.util.List;

/** 返回列表实体 */
public class ResultList<E> extends ArrayList<E> implements IResultList<E>
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int totalCount;

	public int getTotalCount()
	{
		return this.totalCount;
	}

	public void setTotalCount(int totalCount)
	{
		this.totalCount = totalCount;
	}

	public ResultList()
	{
	}

	public ResultList(List<E> list)
	{
		if (list != null)
		{
			for (int i = 0; i < list.size(); i++)
			{
				Object o = list.get(i);
				if (o instanceof Object[])
				{
					Object[] li = (Object[]) o;
					if (li.length > 0)
					{
						this.add((E) li[0]);
					}
				}
				else
					this.add((E) o);
			}
		}
	}

}